const app = getApp(),
  $extConfig = xhs.getExtConfigSync(),
  $config = require("../../config.js"),
  WxParse = require('../wxParse/wxParse.js'),
  $appId = $extConfig.appId || $config.appId,
  $host = $extConfig.host || $config.host,
  //业务域名
  $resHost = $extConfig.resHost || $config.resHost,
  appId = $extConfig.appId || $config.appId; //资源域名
Component({
  /**
   * 组件的属性列表a
   */
  properties: {
    isGou: {
      type: Boolean,
      value: false
    }
  },
  attached() {
    app.$getConfigData().then(data => {
      this.setData({
        userAgreement: data.wechatInfo.userAgreement || xhs.getStorageSync('config').wechatInfo.userAgreement
      });
      let article = data.wechatInfo.userAgreement || xhs.getStorageSync('config').wechatInfo.userAgreement;
      WxParse.wxParse('article', 'html', article, this, 5);
    });
  },
  data: {
    userAgreement: ''
  },
  /**
   * 组件的方法列表
   */
  methods: {
    closeFn() {
      this.setData({
        isGou: false
      });
    }
  }
});